<?php 
$i=0;
?>
<?php
if(!empty($comments))
{
	foreach($comments as $comment)
	{ 
		$class = null;
		if ($i++ % 2 == 0)
		{
			$class = 'altrow';
		}
		?>
		<div class="<?php echo $class;?> comment_box">
	
			<div class="post_info fl">
			<?php
			$listingData = array();
			if(isset($listingInfo[$comment["Review"]['listing_id']]))
			{
				$listingData = $listingInfo[$comment["Review"]['listing_id']];
				?>
				<?php echo $html->link($html->image($listingData['image'],array('thumb'=>array('crop'=>true,'width'=>60,'height'=>60))),$listingData['viewUrl'],array('escape'=>false));?>
			
				<?php
			}?>
			</div>
			<div class="comment_body fl">
			<div class="fl">
			<?php echo __('Commented on')?> <?php echo $html->link($comment["Review"]['title'],'/reviews/view/'.$comment["Review"]['id']);?>
			</div>
				<div class="time">
					<?php echo $time->timeAgoInwords($comment["ReviewComment"]['created'],array('shortString'=>true));?>
				</div>
				<div class="clear"></div>
				
				<div class="clear"></div>
					<?php echo nl2br($comment["ReviewComment"]['body']);?>
			</div>
			<div class="clear"></div>

		</div>
		<?php 
	} ?>

	<?php $paginator->options(array('url'=>$this->passedArgs))?>
	<div class='paginate'>
		<?php echo $paginator->prev(__('Prev'));?>
		<?php echo $paginator->numbers(array('separator'=>' ','url'=>$this->passedArgs));?>
		<?php echo $paginator->next(__('Next'));?>
	</div>
	
<?php }else{?>
	<?php echo __('There is no comment.')?>
<?php }?>